<?php

class School
{
    /** @var int */
    protected $id = 0;
    /** @var string */
    protected $name = '';
    /** @var int */
    protected $unicode = 0;
    /** @var string */
    protected $country = '';
    /** @var string */
    protected $province = '';
    /** @var string */
    protected $city = '';
    /** @var string */
    protected $region = '';
    /** @var string */
    protected $address = '';
    /** @var int */
    protected $authType = '';
    /** @var string */
    protected $ipRange = '';

    /**
     * @return string
     */
    public function getIpRange()
    {
        return $this->ipRange;
    }

    /**
     * @param string $ipRange
     */
    public function setIpRange($ipRange)
    {
        $this->ipRange = $ipRange;
    }

    /**
     * @return int
     */
    public function getUnicode()
    {
        return $this->unicode;
    }

    /**
     * @param int $unicode
     */
    public function setUnicode($unicode)
    {
        $this->unicode = $unicode;
    }

    public function getDisplayRealNameAuthTypeName()
    {
        $RealNameAuthTypeArray = YimeRealNameAuth::getTypeArray();
        if ($RealNameAuthTypeArray && is_array($RealNameAuthTypeArray)) {
            if (isset($RealNameAuthTypeArray[$this->getAuthType()])) {
                return $RealNameAuthTypeArray[$this->getAuthType()];
            }
        }
        return '[未指定]';
    }

    /**
     * @return array
     */
    public function getDataArray()
    {
        return array(
            'name'     => $this->getId(),
            'country'  => $this->getCountry(),
            'province' => $this->getProvince(),
            'city'     => $this->getCity(),
            'region'   => $this->getRegion(),
            'address'  => $this->getAddress(),
            'authType' => $this->getAuthType(),
        );
    }

    /**
     * @return string
     */
    public function getAddress()
    {
        return $this->address;
    }

    /**
     * @param string $address
     */
    public function setAddress($address)
    {
        $this->address = $address;
    }

    /**
     * @return string
     */
    public function getCity()
    {
        return $this->city;
    }

    /**
     * @param string $city
     */
    public function setCity($city)
    {
        $this->city = $city;
    }

    /**
     * @return string
     */
    public function getCountry()
    {
        return $this->country;
    }

    /**
     * @param string $country
     */
    public function setCountry($country)
    {
        $this->country = $country;
    }

    /**
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @param int $id
     */
    public function setId($id)
    {
        $this->id = $id;
    }

    /**
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @param string $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * @return string
     */
    public function getProvince()
    {
        return $this->province;
    }

    /**
     * @param string $province
     */
    public function setProvince($province)
    {
        $this->province = $province;
    }

    /**
     * @return string
     */
    public function getRegion()
    {
        return $this->region;
    }

    /**
     * @param string $region
     */
    public function setRegion($region)
    {
        $this->region = $region;
    }

    /**
     * @return int
     */
    public function getAuthType()
    {
        return $this->authType;
    }

    /**
     * @param int $authType
     */
    public function setAuthType($authType)
    {
        $this->authType = $authType;
    }


}